﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FriendAD.Core
{
   public class FriendADDBInitializer:CreateDatabaseIfNotExists<FriendADContext>
    {
        protected override void Seed(FriendADContext context)
        {
            context.Admins.AddOrUpdate(
                p => p.Account,
                 new Admin() { Account = "admin", Password = "jZae727K08KaOmKSgOaGzww/XVqGr/PKEgIMkjrcbJI=", CreateTime = DateTime.Now }
                 );
            context.SaveChanges();
            base.Seed(context);
        }
    }
}
